<template>
    <!--建档资料维护模块 授权书资料维护页面-->
    <div class="baseInfoPage">
         <div class="title">
            <span>缴费方式</span>
        </div>
        <!-- 表单   -->
        <el-form :rules="rules" ref="euag" label-width="130px" class="search_container">
                <el-row>
                     <el-col :span="16" class="common-box">
                        <el-col :span="5" class="common-lab">
                            <label class="labelName">缴费方式</label>
                        </el-col>
                        <el-col :span="7">
                            <el-select disabled v-model="euaa.billchnl" placeholder="" >
                                <el-option
                                    v-for="item in billchnls"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value">
                                </el-option>
                            </el-select>
                        </el-col>
                        <el-col :span="6" style="padding-left:5px!important;">
                            <el-button :disabled="flag =='N'" type="primary" plain @click="queryAccountsByClntnum">选取已存在的账号</el-button>
                        </el-col>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="8" class="common-box">
                        <el-col :span="10" class="common-lab">
                             <label class="labelName">付款证件号码</label>
                        </el-col>
                         <el-col :span="14">
                            <el-col :span="17"><el-input  :disabled="flag =='N'" v-model="euag.asId" @change="chooseCustomer" placeholder=""></el-input></el-col>
                            <el-col :span="7" style="padding-left:10px!important;">
                                <el-button :disabled="flag =='N'" type="primary" plain  @click="asIdDialogVisible = true">选择</el-button>
                            </el-col>
                         </el-col>
                    </el-col>
                    <el-col :span="8" class="common-box">
                        <el-col :span="10" class="common-lab">
                             <label class="labelName">姓名</label>
                        </el-col>
                         <el-col :span="14">
                             <el-input disabled v-model="euag.asName"  placeholder=""></el-input>
                         </el-col>
                    </el-col>
                    <el-col :span="8" class="common-box">
                        <el-col :span="10" class="common-lab">
                             <label class="labelName">客户号</label>
                        </el-col>
                        <el-col :span="14">
                             <el-input disabled v-model="euag.payrnum" placeholder=""></el-input>
                         </el-col>
                    </el-col>
                    <el-col :span="8" class="common-box">
                        <el-col :span="10" class="common-lab">
                             <label class="labelName">账户所属城市</label>
                        </el-col>
                        <el-col :span="14">
                            <el-col :span="17">
                                <el-input disabled v-model="euag.asCitydesc"  placeholder=""></el-input>
                            </el-col>
                            <el-col :span="7" style="padding-left:10px!important;">
                                <el-button :disabled="flag =='N'" type="primary" plain @click="cityCodeClick">选择</el-button>
                            </el-col>
                        </el-col>
                    </el-col>
                    <el-col :span="16" class="common-box">
                        <el-col :span="5" class="common-lab">
                            <label class="labelName">有效日期</label>
                        </el-col>
                        <el-col :span="7" >
                            <el-input disabled v-model="euag.datefrm" placeholder=""></el-input>
                        </el-col>
                         <el-col :span="1" class="text_center"><span> 至</span></el-col>
                        <el-col :span="7">
                            <el-input disabled v-model="euag.dateend" placeholder=""></el-input>
                        </el-col>
                    </el-col>
                    <el-col :span="8" class="common-box">
                            <el-col :span="10" class="common-lab">
                                <label class="labelName">转账类别</label>
                            </el-col>
                            <el-col :span="14">
                                <el-input disabled v-model="euag.accname"  placeholder=""></el-input>
                            </el-col>
                    </el-col>
                    <el-col :span="16" class="common-box">
                            <el-col :span="5" class="common-lab">
                                <label class="labelName">银行代码/银行名称</label>
                            </el-col>
                            <el-col :span="19">
                                <el-row>
                                    <el-col :span="5">
                                        <el-input disabled v-model="euag.facthous"  placeholder=""></el-input>
                                    </el-col>
                                    <el-col :span="5" class="pl5">
                                        <el-input disabled v-model="euag.bankkey" placeholder=""></el-input>
                                    </el-col>
                                     <el-col :span="14" class="pl5">
                                        <el-col :span="17">
                                            <el-input disabled v-model="euag.bankdesc" placeholder=""></el-input>
                                        </el-col>
                                        <el-col :span="7" style="padding-left:10px!important;">
                                            <el-button  :disabled="flag =='N'" type="primary" plain @click="queryBankListClick">选择</el-button>
                                        </el-col>
                                    </el-col>
                                </el-row>
                            </el-col>
                    </el-col>
                    <el-col :span="8" class="common-box">
                        <el-col :span="10" class="common-lab">
                             <label class="labelName">账号卡号</label>
                        </el-col>
                        <el-col :span="14">
                             <el-input :disabled="flag =='N'" v-model="euag.bankacckey"  placeholder=""></el-input>
                         </el-col>
                    </el-col>
                    <el-col :span="8" class="common-box">
                        <el-col :span="10" class="common-lab">
                             <label class="labelName">账户持有人漏填</label>
                        </el-col>
                        <el-col :span="14">
                             <el-select  v-model="euag.flag01" :disabled="flag =='N'"  placeholder="" >
                                <el-option
                                    v-for="item in flag01"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value">
                                </el-option>
                            </el-select>
                         </el-col>
                    </el-col>
                    <el-col :span="8" class="common-box">
                        <el-col :span="10" class="common-lab">
                             <label class="labelName">已交银行存折复印件</label>
                        </el-col>
                        <el-col :span="14">
                            <el-select v-model="euag.flag02"  :disabled="flag =='N'" placeholder="" >
                                <el-option
                                    v-for="item in flag02"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value">
                                </el-option>
                            </el-select>
                         </el-col>
                    </el-col>
                    <el-col :span="6" style="padding-left:5px!important;">
                        <el-button  :disabled="flag =='N'" type="primary" plain @click="delEuag">删除</el-button>
                    </el-col>
                </el-row>
            </el-form>

        <!-- 弹框 缴费方式（选取已存在的账号按钮）-->
        <el-dialog
            title="账号列表"
            :visible.sync="clntBankListDialogVisible"
            width="70%"
            center>
            <el-row>
                <el-col :span="24">
                    <el-table class="mt20"
                        ref="multipleTable"
                        :data="clntBankList"
                        @row-click="clntBankRowClick"
                        tooltip-effect="dark"
                        style="width: 100%">
                        <el-table-column
                            prop="facthous"
                            label="转账类别">
                        </el-table-column>
                        <el-table-column
                            prop="citydesc"
                            label="账号所属城市">
                        </el-table-column>
                        <el-table-column
                            prop="bankaccdsc"
                            label="银行名称"
                            show-overflow-tooltip>
                        </el-table-column>
                        <el-table-column
                            width="200"
                            prop="bankacckey"
                            label="账号">
                        </el-table-column>
                            <el-table-column
                            prop="bankkey"
                            label="说明"
                            show-overflow-tooltip>
                        </el-table-column>
                        <el-table-column
                            width="120"
                            prop="currfrom"
                            label="有效起日">
                        </el-table-column>
                         <el-table-column
                            width="120"
                            prop="currto"
                            label="有效迄日">
                        </el-table-column>
                    </el-table>
                </el-col>
            </el-row>
            <span slot="footer" class="dialog-footer">
                <el-button @click="clntBankListDialogVisible = false">返 回</el-button>
            </span>
        </el-dialog>

        <!-- 弹框 投保内容（选择按钮）-->
        <el-dialog
            title="授权书维护"
            :visible.sync="asIdDialogVisible"
            width="70%"
            center>
            <el-row>
                <el-col :span="24">
                    <el-table class="mt20"
                        ref="multipleTable"
                        :data="clnts"
                        @row-click="clntRowClick"
                        tooltip-effect="dark"
                        style="width: 100%">
                        <el-table-column
                        prop="secuityno"
                        label="证件号码">
                        </el-table-column>
                        <el-table-column
                        prop="surname"
                        label="姓名">
                        </el-table-column>
                        <el-table-column
                        prop="clntnum"
                        label="客户号">
                        </el-table-column>
                        <el-table-column
                        prop="anbAtCcd2"
                        label="年龄">
                        </el-table-column>
                        <el-table-column
                        prop="cltsex"
                        label="性别">
                        <template  slot-scope="scope">
                            <div v-for="sex in sexs" :key="sex.value">
                                <div v-if="sex.value==scope.row.cltsex">
                                    {{sex.label}}
                                </div>
                            </div>
                        </template>
                        </el-table-column>
                        <el-table-column
                        prop="flag"
                        label="FLAG">
                        </el-table-column>
                    </el-table>
                </el-col>
            </el-row>
            <span slot="footer" class="dialog-footer">
                <el-button @click="asIdDialogVisible = false">返 回</el-button>
            </span>
        </el-dialog>

        <!-- 弹框 账户所属城市（选择按钮）-->
        <el-dialog
            title="账户所属城市"
            :visible.sync="cityListDialogVisible"
            width="60%"
            center>
            <el-row>
                <el-col :span="24">
                    <div class="searchPage">
                        <!-- 查询表单 -->
                        <el-form label-width="120px" class="search_container" >
                            <el-row>
                                <el-col :span="10">
                                    <el-form-item label="城市名称" prop="applnum">
                                        <el-input v-model="cityName" placeholder=""></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="14" class="text_right">
                                    <el-button type="primary" icon="el-icon-search" @click="cityCodeClick"></el-button>
                                    <el-button type="primary" plain  icon="el-icon-refresh"></el-button>
                                </el-col>
                            </el-row>
                        </el-form>
                    </div>
                    <el-table
                        ref="multipleTable"
                        :data="cityCodeList"
                        tooltip-effect="dark"
                        @row-click="cityCodeRowClick"
                        style="width: 100%">
                        <el-table-column
                            prop="citycode"
                            label="城市代码">
                        </el-table-column>
                        <el-table-column
                            prop="citydesc"
                            label="城市名称">
                        </el-table-column>
                    </el-table>
                    <el-row>
                        <el-col :span="24">
                            <div class="pagination">
                                <el-pagination
                                    background
                                    v-if='paginations.total > 0'
                                    :page-sizes="paginations.pageSizes"
                                    :page-size="paginations.pageSize"
                                    :layout="paginations.layout"
                                    :total="paginations.total"
                                    :current-page='paginations.pageIndex'
                                    @current-change='handleCurrentChange'
                                    @size-change='handleSizeChange'>
                                </el-pagination>
                            </div>
                        </el-col>
                    </el-row>
                </el-col>
            </el-row>
            <span slot="footer" class="dialog-footer">
                <el-button @click="cityListDialogVisible = false">返 回</el-button>
            </span>
        </el-dialog>

        <!-- 弹框 银行代码/银行名称（选择按钮）-->
        <el-dialog
            title="银行代码/银行名称"
            :visible.sync="bankListDialogVisible"
            width="60%"
            center>
            <el-row>
                <el-col :span="24">
                    <el-table
                        ref="multipleTable"
                        :data="bankList"
                        tooltip-effect="dark"
                        @row-click="bankRowClick"
                        style="width: 100%">
                        <el-table-column
                            prop="facthous"
                            label="转账类型">
                        </el-table-column>
                        <el-table-column
                            prop="bankkey"
                            label="银行代码">
                        </el-table-column>
                        <el-table-column
                            prop="bankaccdsc"
                            label="银行名称">
                        </el-table-column>
                    </el-table>
                    <el-row>
                        <el-col :span="24">
                            <div class="pagination">
                                <el-pagination
                                    background
                                    v-if='paginations2.total > 0'
                                    :page-sizes="paginations2.pageSizes"
                                    :page-size="paginations2.pageSize"
                                    :layout="paginations2.layout"
                                    :total="paginations2.total"
                                    :current-page='paginations2.pageIndex'
                                    @current-change='handleCurrentChange2'
                                    @size-change='handleSizeChange2'>
                                </el-pagination>
                            </div>
                        </el-col>
                    </el-row>
                </el-col>
            </el-row>
            <span slot="footer" class="dialog-footer">
                <el-button @click="bankListDialogVisible = false">返 回</el-button>
            </span>
        </el-dialog>

        <!-- 弹框 证件号码（选择按钮）-->
        <el-dialog
                title="选择客户"
                :visible.sync="secuitynoDialogVisible"
                width="70%"
                center>
            <div slot="title">
                <div class="el-dialog__title" style="margin:3px;">选择客户</div>
                <customerInfo ref="imCustomerInfo"></customerInfo>
            </div>
            <span slot="footer" class="dialog-footer">
                <el-button @click="secuitynoDialogVisible = false">返 回</el-button>
            </span>
        </el-dialog>
    </div>
</template>
<script>
    import { queryClntBankList,checkEuagpkyFacthous,
            queryCityCodeList,queryBankList, checkPensionPolicy, queryGyBankList } from "@/api/policyRecord/materialsMaintain/insurance.js";
    import { getCustomerInfoDetail } from "@/api/customermanage/customerManage.js";
    import constant from '@/utils/constant';
    import {Message, MessageBox} from 'element-ui';
    export default {
        components: {
            customerInfo: resolve => require(['../../customerManage/customerInfoQuery'], resolve),
        },
        data(){
            return {
                value:'',
                clntBankListDialogVisible:false,//默认隐藏缴费方式 弹框
                asIdDialogVisible:false,//默认隐藏付款证件号码（选择按钮）弹框
                cityListDialogVisible:false,//默认隐藏账户所属城市（选择按钮）弹框
                bankListDialogVisible:false,//默认隐藏银行代码/银行名称（选择按钮）弹框
                secuitynoDialogVisible:false,
                euag:{
                    billchnl:'', secuityno:'',
                    surname:'',payrnum:'',
                    citycode:'',datefrm:'',
                    dateend:'',accname:'',
                    bankkey:'',bankdesc:'',
                    bankacckey:'', flag01:'',flag02:'',
                },
                flag01:[
                    {
                         value:'',
                         label:''
                     },
                    {
                         value:'Y',
                         label:'Y'
                     },{
                         value:'N',
                         label:'N'
                     },{
                         value:'O',
                         label:'O'
                     }
                ],
                flag02:[
                    {
                         value:'',
                         label:''
                     },
                     {
                         value:'Y',
                         label:'Y'
                     },{
                         value:'N',
                         label:'N'
                     },
                ],
                sexs:[
                    {
                         value:'',
                         label:''
                     },
                    {
                        value:'M',
                        label:'男'
                     },{
                        value:'F',
                        label:'女'
                     },{
                        value:'U',
                        label:'不明'
                     }
                ],
                euaa: {},
                billchnls:[
                    {
                         value:'',
                         label:''
                     },
                    {
                        value:'G',
                        label:'G-团体缴费',
                    },{
                        value:'C',
                        label:'C-银行代收/现金缴费',
                    },{
                        value:'D',
                        label:'D-银行自动转帐',
                    },{
                        value:'N',
                        label:'N',
                    },
                ],
                paginations: {
                    total: 0,        // 总数
                    pageIndex: 1,  // 当前位于哪页
                    pageSize: 10,   // 1页显示多少条
                    pageSizes: [5, 10, 15, 20],  //每页显示多少条
                    layout: "total, sizes, prev, pager, next, jumper"   // 翻页属性
                },
                paginations2: {
                    total: 0,        // 总数
                    pageIndex: 1,  // 当前位于哪页
                    pageSize: 10,   // 1页显示多少条
                    pageSizes: [5, 10, 15, 20],  //每页显示多少条
                    layout: "total, sizes, prev, pager, next, jumper"   // 翻页属性
                },
                rules: {},
                insureDataForm: this.insureData,
                clnts: [],
                clntBankList: [],
                cityCodeList: [],
                bankList: [],
                cityName: '',
            }
        },
        props:{
			flag:{
				type:String
			},
            insureData:{
                type: Object,
            }
        },
        mounted(){
            this.reloadInsureData(null);
        },
        methods: {
            reloadInsureData(insureData){
                if(insureData != null){
                    this.insureDataForm = insureData;
                }
                this.euag = this.insureDataForm.euag;
                this.euaa = this.insureDataForm.euaa;
                let euad1 = this.insureDataForm.euad1;
                let euad2 = this.insureDataForm.euad2;
                // 第二被保人
                let euad3 = this.insureDataForm.euad3;
                this.clnts = [];
                let falg = '授权书维护';
                if(euad1.clntnum == euad2.clntnum){
                    this.clnts.push({secuityno:euad1.secuityno,surname:euad1.surname,
                                    clntnum:euad1.clntnum,anbAtCcd2:euad1.anbAtCcd2,
                                    cltsex:euad1.cltsex,mortcls:euad1.mortcls,
                                    flag:falg});
                }else{
                    this.clnts.push({secuityno:euad1.secuityno,surname:euad1.surname,
                                    clntnum:euad1.clntnum,anbAtCcd2:euad1.anbAtCcd2,
                                    cltsex:euad1.cltsex,mortcls:euad1.mortcls,
                                    flag:falg});
                    this.clnts.push({secuityno:euad2.secuityno,surname:euad2.surname,
                                    clntnum:euad2.clntnum,anbAtCcd2:euad2.anbAtCcd2,
                                    cltsex:euad2.cltsex,mortcls:euad2.mortcls,
                                    flag:falg});
                    this.clnts.push({secuityno:euad3.secuityno,surname:euad3.surname,
                                    clntnum:euad3.clntnum,anbAtCcd2:euad3.anbAtCcd2,
                                    cltsex:euad3.cltsex,mortcls:euad3.mortcls,
                                    flag:falg});
                }
            },
            getInsureData(){
                return this.insureDataForm;
            },
            changeBillchnl(val){
                this.euaa.billchnl = val;
            },
            clntRowClick(row, column, event){
                this.euag.asId = row.secuityno;
                this.euag.asName = row.surname;
                this.euag.payrnum = row.clntnum;
                this.asIdDialogVisible = false;
            },
            queryAccountsByClntnum(){
                let clntnum = this.euag.payrnum;
                //let bankacckey = this.euag.bankacckey;
                if(clntnum == ''){
                    this.$message({
                        message: '无符合条件资料！',
                        type: 'error'
                    });
                    return ;
                }
                this.$store.dispatch('loading/CHNAGE_SUBLOADING',true);
                let para = {clntnum:clntnum};
                queryClntBankList(para).then(res =>{
                    if(res.resultCode == constant.SUCCESS){
                        this.clntBankList = res.data;
                        this.$store.dispatch('loading/CHNAGE_SUBLOADING',false);
                        this.clntBankListDialogVisible = true;
                    }
                }).catch(err =>{
                    console.log(err);
                    this.$store.dispatch('loading/CHNAGE_SUBLOADING',false);
                })
            },
            clntBankRowClick(row, column, event){
                if(row.facthous==''){//转账类别等于空,不返回账号信息
                    this.$message({
                        message: '转账类别不可为空！',
                        type: 'error'
                    });
                    return;
                }
                this.checkEuagpkyFacthous(row.facthous);
                this.euag.facthous = row.facthous;
                this.euag.citycode = row.citycode;
                this.euag.asCitydesc = row.citydesc;
                this.euag.bankdesc = row.bankaccdsc;
                this.euag.bankacckey = row.bankacckey;
                this.euag.bankkey = row.bankkey;
                this.euag.datefrm = this.euaa.dtecrt;//row.currfrom;
                this.euag.dateend = '99999999';//row.currto;
                this.clntBankListDialogVisible = false;
            },
            checkEuagpkyFacthous(facthous){
                this.$store.dispatch('loading/CHNAGE_SUBLOADING',true);
                let para = {facthous:facthous};
                checkEuagpkyFacthous(para).then(res =>{
                    if(res.resultCode == constant.SUCCESS){
                        let data = res.data;
                        if(data.info != undefined){
                             this.$message({
                                message: data.info,
                                type: 'error'
                            });
                        }
                        if(data.facthous != undefined){
                            this.euag.facthous = data.facthous;
                        }
                        if(data.accname != undefined){
                            this.euag.accname = data.accname;
                        }
                    }
                    this.$store.dispatch('loading/CHNAGE_SUBLOADING',false);
                }).catch(err =>{
                    console.log(err);
                    this.$store.dispatch('loading/CHNAGE_SUBLOADING',false);
                })
            },
            cityCodeClick(){
                this.$store.dispatch('loading/CHNAGE_SUBLOADING',true);
                let para = {
                    pageNumber: this.paginations.pageIndex,
                    pageSize: this.paginations.pageSize,
                    cityName: this.cityName
                };
                queryCityCodeList(para).then(res =>{
                    if(res.resultCode == constant.SUCCESS){
                        this.paginations.total = res.data.total;
                        this.cityCodeList = res.data.list;
                        this.$store.dispatch('loading/CHNAGE_SUBLOADING',false);
                        this.cityListDialogVisible = true;
                    }
                }).catch(err =>{
                    console.log(err);
                    this.$store.dispatch('loading/CHNAGE_SUBLOADING',false);
                })
            },
            handleSizeChange(pageSize) {// 每页多少条切换
                this.paginations.pageSize = pageSize;
                this.cityCodeClick();
            },
            handleCurrentChange(page) {// 上下分页
                this.paginations.pageIndex = page;
                this.cityCodeClick();
            },
            handleSizeChange2(pageSize) {// 每页多少条切换
                this.paginations2.pageSize = pageSize;
                this.queryBankListClick();
            },
            handleCurrentChange2(page) {// 上下分页
                this.paginations2.pageIndex = page;
                this.queryBankListClick();
            },
            cityCodeRowClick(row, column, event){
                this.euag.citycode = row.citycode;
                this.euag.asCitydesc = row.citydesc;
                this.cityListDialogVisible = false;
            },
            queryBankListClick(){
                this.$store.dispatch('loading/CHNAGE_SUBLOADING',true);
                let para = {
                    pageNumber: this.paginations2.pageIndex,
                    pageSize: this.paginations2.pageSize
                };

                let applnum = this.insureDataForm.euaa.applnum;
                console.log("受理号: ", applnum)
                checkPensionPolicy(applnum).then(res => {
                    if (res.resultCode == constant.SUCCESS && res.data && res.data == 'Y') {
                      // 查询个养银行列表
                      queryGyBankList(para).then(res =>{
                        if(res.resultCode == constant.SUCCESS){
                          this.paginations2.total = res.data.total;
                          this.bankList = res.data.list;
                          this.$store.dispatch('loading/CHNAGE_SUBLOADING',false);
                          this.bankListDialogVisible = true;
                        }
                      }).catch(err =>{
                        console.log(err);
                        this.$store.dispatch('loading/CHNAGE_SUBLOADING',false);
                      })
                    } else {
                      queryBankList(para).then(res =>{
                        if(res.resultCode == constant.SUCCESS){
                          this.paginations2.total = res.data.total;
                          this.bankList = res.data.list;
                          this.$store.dispatch('loading/CHNAGE_SUBLOADING',false);
                          this.bankListDialogVisible = true;
                        }
                      }).catch(err =>{
                        console.log(err);
                        this.$store.dispatch('loading/CHNAGE_SUBLOADING',false);
                      })
                    }
                }).catch(err => {
                  console.log(err);
                  this.$store.dispatch('loading/CHNAGE_SUBLOADING',false);
                })
            },
            bankRowClick(row, column, event){
                this.euag.facthous = row.facthous;
                this.checkEuagpkyFacthous(row.facthous);
                this.euag.bankkey = row.bankkey;
                this.euag.bankdesc = row.bankaccdsc;
                let key = this.euag.bankkey;
                let bankdesc = this.euag.bankdesc;
                if (key == '' && bankdesc == ''){
                   this.euag.datefrm = '00000000';
                   this.euag.dateend = '99999999';
                }
                this.bankListDialogVisible = false;
            },
            delEuag(){
                MessageBox.confirm('确认是否删除？', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    this.euag.asId = '';
                    this.euag.asName = '';
                    this.euag.payrnum = '';
                    this.euag.accname = '';
                    this.euag.asId = '';
                    this.euag.asId = '';
                    this.euag.facthous = '';
                    this.euag.citycode = '';
                    this.euag.asCitydesc = '';
                    this.euag.bankdesc = '';
                    this.euag.bankacckey = '';
                    this.euag.bankkey = '';
                    this.euag.datefrm = '0';
                    this.euag.dateend = '99999999';
                });
            },
            trim(val){
                if(val == undefined){
                    return '';
                }
                return val.replace(/(^\s*)|(\s*$)/g, '')
            },
            changeCustomer(customerInfo){
                console.info("取得用户信息",customerInfo);
                this.$store.dispatch('loading/CHNAGE_SUBLOADING', true)
                let params = {
                    customerNo: customerInfo.customerNo
                }
                getCustomerInfoDetail(params).then(res => {
                    this.$store.dispatch('loading/CHNAGE_SUBLOADING', false)
                    if (res.resultCode == constant.SUCCESS && res.data) {
                        let customer = res.data;
                        this.euag.asId = this.trim(customer.idNo);
                        this.euag.asName = this.trim(customer.customerName);
                        this.euag.payrnum = this.trim(customer.customerNo);
                        this.secuitynoDialogVisible = false;
                    }
                }).catch(err => {
                    this.$store.dispatch('loading/CHNAGE_SUBLOADING', false)
                })
            },
            chooseCustomer(){
                this.secuitynoDialogVisible = true;
                let searchParams = {
                    'customerNo': '',
                    'customerName': '',
                    'idNo': this.euag.asId
                };
                this.$refs.imCustomerInfo.setSearchParams(searchParams);
                if(this.euag.asId){
                    this.$refs.imCustomerInfo.getList();
                }
            },
        },
        watch:{

        }
    }
</script>
<style lang="less" scoped>
.baseInfoPage{
    .common-box{
        padding-bottom: 15px;
    }
    .common-lab{
        line-height:normal!important;
        text-align: right;
        .labelName{
            text-align: right;
        }
    }
}
</style>
